package game

import "time"

type BsProjectGameInfo struct {
	GameInfoId uint `gorm:"primarykey;column:game_info_id;comment:比赛编号" json:"gameInfoId"`
	PlayerNum  int  `gorm:"column:player_num;comment:运动员数量" json:"playerNum" form:"playerNum"`
	UmpireNum  int  `gorm:"column:umpire_num;comment:裁判数量" json:"umpireNum" form:"umpireNum"`
	// SafetyId         int       `gorm:"column:safety_id;comment:安全须知" json:"safetyId" form:"safetyId"`
	ContestStartTime   time.Time `gorm:"column:contest_start_time;comment:比赛开始时间" json:"contestStartTime" form:"contestStartTime"`
	ContestEndTime     time.Time `gorm:"column:contest_end_time;comment:比赛结束时间" json:"contestEndTime" form:"contestEndTime"`
	ProjectId          uint      `json:"projectId" form:"projectId" gorm:"primarykey;column:project_id;comment:项目编号"`
	CreateTime         time.Time `json:"createTime" form:"createTime" gorm:"->"`
	UpdateTime         time.Time `json:"updateTime" form:"updateTime" gorm:"->"`
	Status             int       `json:"status" form:"status" gorm:"column:status;comment:状态(1-已发布，2-正在录入， 3-已录入，3-已发布)"`
	GameStatus         int       `json:"gameStatus" form:"gameStatus" gorm:"->"` //(1-未开始，2-进行中，3-已结束)
	ProjectTitle       string    `json:"projectTitle" gorm:"->"`
	GameInfoTitle      string    `json:"gameInfoTitle" gorm:"->"`
	SafetyKnownContent string    `json:"safetyKnownContent" gorm:"->"`
	UmpireIds          []int     `json:"umpireIds" gorm:"-"`
}

func (BsProjectGameInfo) TableName() string {
	return "bs_project_game_info"
}
